/**
 * @file lowbattery.h
 *
 */
#ifndef LOWBATTERY_H
#define LOWBATTERY_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_watch_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../../product/crane_bare/config/watch/lv_watch_conf.h"
#endif

#if USE_LV_WATCH_LOWBATTERY != 0

/*********************
 *      DEFINES
 *********************/
#define ENTER_LOWBATTERY_MODE_LEVEL 15
#define AUTO_POWER_OFF_LEVEL        0

/**********************
 *      TYPEDEFS
 **********************/
typedef struct
{
    lv_watch_activity_ext_t oldext;
    lv_obj_t * timelabel;
} lv_lowbattery_ext_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
lv_res_t lowbattery_create_btn_action(lv_obj_t * btn);
void lowbattery_task(lv_task_t * task);

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_LOWBATTERY*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*LOWBATTERY_H*/
